﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using mitasoft.AdsShedule.Business;

namespace mitasoft.AdsShedule.Infrastructure
{
    public class BaseForm : Form
    {
        public BaseForm()
        {
            this.Load += new EventHandler(BaseForm_Load);
            this.FormClosed += new FormClosedEventHandler(BaseForm_FormClosed);
        }

        void BaseForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            BusinessAccess.Instance.SaveDataSet();
        }

        void BaseForm_Load(object sender, EventArgs e)
        {
            LoadData();
            BindDataToControls();
        }


        public virtual void LoadData() { }
        public virtual void BindDataToControls() { }
    }
}
